package javabook.ch06;

class Sungjuk_6_4 { 
	
	void title() { 
		System.out.println("*** 추상 클래스(abstract class) ***"); 
		System.out.println("*** 자바의 성적 출력 ***"); 
		System.out.println("**학번** **성명** **점수**"); 
		System.out.println("---------------------------"); 
	}
}

abstract class Sungjuk_6_4_1 extends Sungjuk_6_4 { 
	String hakbun1 = "2060001"; 
	String name1 = "Ko Eung-Nam"; 
	int jumsu1 = 60; 
	abstract void prt_data1();
	
	abstract class Sungjuk_6_4_2 extends Sungjuk_6_4_1 { 
		String hakbun2 = "2060002"; 
		String name2 = "Boo Chang-Mi"; 
		int jumsu2 = 80; 
		abstract void prt_data2(); 
	}
	
	abstract class Sungjuk_6_4_3 extends Sungjuk_6_4_2 { 
		String hakbun3 = "2060003"; 
		String name3 = "Ko Yoo-Jin"; 
		int jumsu3 = 100; 
		abstract void prt_data3(); 
	}
}

class Sungjuk_6_4_4 extends Sungjuk_6_4_3 { 
	
	String hakbun4 = "2060004"; 
	String name4 = "Ko Su-Ji"; 
	int jumsu4 = 99; 
	
	public void prt_data1() { 
		
		System.out.println(hakbun1 + "  " + name1 + " " + jumsu1); 
	}
	
	public void prt_data2() { 
	
		System.out.println(hakbun2 + "  " + name2 + " " + jumsu2); 
	
	} 
	
	public void prt_data3() { 
	
		System.out.println(hakbun3 + "  " + name3 + " " + jumsu3); 
	
	} 
	
	public void prt_data4() { 
	
		System.out.println(hakbun4 + "  " + name4 + " " + jumsu4); 
	
	}
}
	class Jv_6_4 extends Sungjuk_6_4_4 { 
		public static void main(String[] args) { 
			
			Sungjuk_6_4 ttt = new Sungjuk_6_4(); 
			ttt.title();
			
			Sungjuk_6_4_4 ken_sung = new Sungjuk_6_4_4();
			Sungjuk_6_4_4 wife_sung = new Sungjuk_6_4_4(); 
			Sungjuk_6_4_4 yoo_sung = new Sungjuk_6_4_4(); 
			Sungjuk_6_4_4 soo_sung = new Sungjuk_6_4_4(); 
			
			ken_sung.prt_data1(); 
			wife_sung.prt_data2(); 
			yoo_sung.prt_data3(); 
			soo_sung.prt_data4(); 
			
		} 
	}
	
	

	 

	
	
	
	
	
